home *** CD-ROM | disk | FTP | other *** search
/ BBS Toolkit / BBS Toolkit.iso / pc_board / lostmu22.zip / PAUZ.DOC < prev    next >
Text File  |  1991-06-01  |  6KB  |  154 lines

  1.                                PAUZ 2.2
  2.  
  3.                Specifiable wait function for batch files
  4.  
  5.                                   by
  6.                                Bob Eyer
  7.                              June 1, 1991
  8.  
  9.  
  10.      Syntax
  11.      ------
  12.      PAUZ ResumeChar [WaitSeconds|TargetTime]
  13.  
  14.      Definitions
  15.      -----------
  16.      ResumeChar:     The upper or lower case character  the  user  must
  17.                      press  to continue processing before PAUZ finishes
  18.                      waiting.  PAUZ's interpretation of  ResumeChar  is
  19.                      not case sensitive.
  20.  
  21.                      If  SPACE is entered for ResumeChar, PAUZ will use
  22.                      the Spacebar as  the  key  to  hit  for  continued
  23.                      processing.  If ANY is used then PAUZ uses any key
  24.                      for this purpose.
  25.  
  26.      Second parameter (optional):
  27.      Either -
  28.      WaitSeconds:    The  maximum  number  of  seconds  PAUZ will delay
  29.                      processing.
  30.      or -
  31.      TargetTime:     The time  in  HH:MM  format  at  which  PAUZ  will
  32.                      continue   processing.   This  parameter  must  be
  33.                      entered with a colon,  in  formats  like  8:40  or
  34.                      08:40.   Postmeridian  times  must  be  entered in
  35.                      24-hour format.
  36.  
  37.                      New:
  38.                      PAUZ  2.2 now tests whether the current time is at
  39.                      OR AFTER the TargetTime, to accommodate the  needs
  40.                      of  Sysops who use complex batch files to automate
  41.                      processing, and don't wish  to  have  their  batch
  42.                      programs  halt  for  nearly 24 hours, in case some
  43.                      process does not quite make it to the given target
  44.                      time.  [Suggestion by Steven Guralnick.]
  45.  
  46.      Where  the second parameter is not mentioned, PAUZ will operate in
  47.      wait rather than target mode, using defaults as discussed below in
  48.      the section entitled "WaitSeconds Defaults".
  49.  
  50.      Discussion
  51.      ----------
  52.      PAUZ  i/o  is redirectable.  So, PAUZ can be used to assist design
  53.      of batch file-based remote door programs.
  54.  
  55.      PAUZ detects number keys during a PAUZ wait, to resume  processing
  56.      by returning an error level identical to the number pressed by the
  57.      user at his keyboard.
  58.  
  59.      Examples
  60.      --------
  61.      The  following  shows  how  to  use PAUZ with the program's return
  62.      message:
  63.  
  64.      (1)
  65.      PAUZ ANY
  66.      Press any key or wait 30 seconds to continue ...
  67.  
  68.      Pressing  any  key  will return control to DOS (or the batch file)
  69.      with  error  level  1;   otherwise,   control   will   be   passed
  70.      automatically  with  error  level  0 if no key is pressed after 30
  71.      seconds have elapsed.
  72.  
  73.      (2)
  74.      PAUZ SPACE
  75.      Press [SPACEBAR] or wait 30 seconds to continue ...
  76.  
  77.      (3)
  78.      PAUZ A
  79.      Press [A] or wait 15 seconds to continue ...
  80.  
  81.      (4)
  82.      PAUZ A 75
  83.      Press [A] or wait 75 seconds to continue ...
  84.  
  85.      Note  the  effect  of  overriding  the 15 second default for the A
  86.      ResumeChar (see below).
  87.  
  88.      (5)
  89.      PAUZ A 14:20
  90.      Press [A] or wait until 14:20 to continue ...
  91.  
  92.      Notice that the use of a target time  causes  PAUZ  to  alter  the
  93.      format of its wait message.
  94.  
  95.      Note:
  96.      In  any of these examples, PAUZ will resume with error level x, if
  97.      a key in the range  1  to  9  is  pressed.   The  error  level  is
  98.      identical to the number of the key selected.
  99.  
  100.      This is useful in using PAUZ to provide  for  branching  logic  in
  101.      batch file programs.
  102.  
  103.      WaitSeconds Defaults
  104.      --------------------
  105.      In  the event the user does not mention WaitSeconds on the command
  106.      line, PAUZ uses  the  identity  of  ResumeChar  to  determine  the
  107.      magnitude of the maximum wait time.  The following table indicates
  108.      the defaults supported:
  109.  
  110.             ResumeChar         Default Wait Time
  111.  
  112.                  A               15 seconds
  113.  
  114.                  B               60
  115.  
  116.                  C              120
  117.  
  118.                  D              240
  119.  
  120.      Anything  used  for ResumeChar other than A, B, C, or D will cause
  121.      PAUZ to use 30 seconds as the default wait time.
  122.  
  123.      Of course, in the event the user does mention WaitSeconds  on  the
  124.      command  line,  the  user's  wait  time will always override these
  125.      defaults.
  126.  
  127.      Error Levels
  128.      ------------
  129.      PAUZ's normal termination is  defined  as  an  uninterrupted  PAUZ
  130.      run  -  i.e.   without touching any ResumeChar key.  In this case,
  131.      PAUZ returns an error level of 0.
  132.  
  133.      If the user interrupts PAUZ processing  by  hitting  the  required
  134.      ResumeChar,  then  PAUZ  returns an error level of 1.  If a number
  135.      key is pressed, PAUZ returns control to the calling program,  with
  136.      an error level identical to the number of the key pressed.
  137.  
  138.      DISCLAIMER:
  139.      ==========
  140.      This  program  is  circulated as freeware without any guarantee or
  141.      warranty; and the  user,  by  downloading  this  program,  or  any
  142.      variant  thereof  or by receiving it or any of its versions in any
  143.      other form, agrees to accept full responsibility for its use.   It
  144.      is  therefore understood that the user accepts this program or any
  145.      previous version as is.
  146.  
  147.      Bob Eyer                  The author may also be reached at
  148.      Compuserve [73230,2620]   ROSE MEDIA 416-733-2285 (Main Conf)
  149.      Toronto                   CMIX 416-277-2363 (Main Conference)
  150.      Canada                    CANADA REMOTE 416-629-7044 (IBM Conf)
  151.      -------------------------------------------------------------
  152.      End of documentation.
  153.  
  154.